package zhh.tangbao.commodity.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

/**
 * <p>
 *     描述
 * </p>
 * @author 粥灰灰
 * <p>2023/4/16</p>
 */

@TableName("commodity_machine_stock_data")
@Data
public class CommodityMachineStockData {

    @TableId(type = IdType.AUTO)
    private Integer id;

    /** 关联的库存ID */
    private Integer stockId;

    /** 商品空闲数;待出售的商品数量 */
    private Integer toBeSold;

    /** 商品库存数;机器内剩余总数量 */
    private Integer totalRemain;

    public CommodityMachineStockData() {
    }

    public CommodityMachineStockData(Integer stockId, Integer toBeSold, Integer totalRemain) {
        this.stockId = stockId;
        this.toBeSold = toBeSold;
        this.totalRemain = totalRemain;
    }
}
